package com.lifeng.finance.demo.service;

import com.lifeng.finance.demo.entity.Item;
import com.lifeng.finance.demo.mapper.ItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ItemService implements ItemMapper{

    @Autowired
    private ItemMapper itemMapper;

    public List<Item> findAll() {
        return itemMapper.findAll();
    }


    public Item findOneById(int id) {
        return itemMapper.findOneById(id);
    }

    @Override
    public List<Item> findSomeByProjectId(int projectId) {

        return itemMapper.findSomeByProjectId(projectId);
    }



    public void add(Item Item) {

        itemMapper.add(Item);

    }

    @Override
    public void update(Item Item) {
        itemMapper.update(Item);
    }

    @Override
    public void delete(int id) {
        itemMapper.delete(id);
    }

}
